77876f9a4445fa4da5b79ed73f74338add12f91b,compiler/tests/org/jetbrains/jet/jvm/compiler/JdkAnnotationsSanityTest.java,JdkAnnotationsSanityTest,getAffectedClasses,#VirtualFile#,194
Before Change
private static Iterable<FqName> getAffectedClasses(final VirtualFile root) {
final Set<FqName> result = Sets.newLinkedHashSet();
VfsUtilCore.visitChildrenRecursively(root, new VirtualFileVisitor() {
@Override
public boolean visitFile(@NotNull VirtualFile file) {
if (ExternalAnnotationsManager.ANNOTATIONS_XML.equals(file.getName())) {
try {
String text = StreamUtil.readText(file.getInputStream());
Matcher matcher = Pattern.compile("<item name=['\"]([\\w\\d\\.]+)[\\s'\"]").matcher(text);
while (matcher.find()) {
result.add(new FqName(matcher.group(1)));
}
}
catch (IOException e) {
throw new RuntimeException(e);
}
}
return true;
}
});
return result;
}
After Change
try {
createEnvironment(myDisposable);
VirtualFile root = VirtualFileManager.getInstance().findFileByUrl(rootUrl);
assert root != null;
final Set<FqName> result = Sets.newLinkedHashSet();
VfsUtilCore.visitChildrenRecursively(root, new VirtualFileVisitor() {
@Override
public boolean visitFile(@NotNull VirtualFile file) {
if (ExternalAnnotationsManager.ANNOTATIONS_XML.equals(file.getName())) {
try {
String text = StreamUtil.readText(file.getInputStream());
Matcher matcher = Pattern.compile("<item name=['\"]([\\w\\d\\.]+)[\\s'\"]").matcher(text);
while (matcher.find()) {
result.add(new FqName(matcher.group(1)));
}
}
catch (IOException e) {
throw new RuntimeException(e);
}
}
return true;
}
});
return Lists.newArrayList(result);
}